{extend name="apps/common/view/front.tpl" /}
<!-- -->
{block name="header_meta"}
<title>{:lang('user_reset_title')}－{:config('common.site_name')}</title>
<meta name="keywords" content="{:lang('user_reset_keywords')}" />
<meta name="description" content="通过短信验证码或邮箱验证码重设密码。" />{/block}
{block name="header_more"}<link href="{:DcUrlCss($domain, $path_root.$path_view.'column.css')}" rel="stylesheet">{/block}
{block name="main"}
<div class="d-flex flex-column justify-content-center h-100">
  <a class="h4 text-light mx-auto mb-4" href="{$path_root}">{:config('common.site_name')}</a>
  <div class="card mx-auto card-width">
    <div class="card-header text-center pt-3">
      <a class="text-purple mr-3" href="javascript:;"><i class="fa fa-fw fa-paw"></i>找回密码</a>
      <a class="text-muted" href="{:DcUrl('user/login/index')}"><i class="fa fa-fw fa-key"></i>密码登录</a>
    </div>
    <form class="card-body" action="{:DcUrl('user/reset/notice')}" method="post" target="_self" data-toggle="form" data-callback="daicuo.user.reset">
      <img class="rounded img-fluid border w-100 mb-3" src="{$path_root}index.php?s=captcha" data-toggle="captcha"/>
      <div class="input-group input-group-sm mb-4">
        <div class="input-group-prepend">
          <span class="input-group-text"><i class="fa fa-fw fa-image"></i></span>
        </div>
        <input type="text" class="form-control" name="img_captcha" required="true" placeholder="图形码" autocomplete="off">
      </div>
      <div class="input-group input-group-sm mb-4">
        <div class="input-group-prepend">
          <span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
        </div>
        <input type="text" class="form-control" name="reset_name" required="true" placeholder="{:implode('/',array_map(lang,$sms_list))}" autocomplete="off">
      </div>
      <div class="input-group input-group-sm mb-4" id="reset_pwd">
        <div class="input-group-prepend">
          <span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
        </div>
        <input type="password" class="form-control" name="reset_pwd" required="true" placeholder="新密码" maxlength="30">
      </div>
      <div class="input-group input-group-sm mb-4">
        <div class="input-group-prepend">
          <span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
        </div>
        <input type="text" class="form-control" name="reset_captcha" required="true" placeholder="动态验证码" autocomplete="off" maxlength="6">
        <div class="input-group-append">
          <button class="btn btn-purple" id="btn-captcha" type="submit" data-toggle="submit" data-action="{:DcUrl('user/reset/notice')}" data-second="{:config('user.captcha_interval')}" data-tips="重发">发送</button>
        </div>
      </div>
      <p class="text-center mb-0">
        <button class="btn btn-purple btn-block" id="btn-submit" type="submit" data-toggle="submit" data-action="{:DcUrl('user/reset/update')}" disabled>下一步</button>
      </p>
    </form>
    <div class="card-footer text-center small">
      请填入<strong>{:implode('/',array_map(lang,$sms_list))}</strong>接收到的6位验证码后点击下一步
    </div>
  </div>
</div>
{/block}